<?php

namespace app\radar\model;

use app\BaseModel;


class RadarStart extends BaseModel
{
    //定义表名
    protected $name = 'longbing_card_start';


    protected static function init ()
    {
        //TODO:初始化内容
    }
    
    public function createStart($data)
    {
        $data['create_time'] = time();
        $result = $this->save($data);
        return !empty($result);
    }
    
    public function updateStart($filter ,$data)
    {
        $data['update_time'] = time();
        $result = $this->where($filter)->update($data);
        return !empty($result);
    }
    
    public function getStart($filter)
    {
        $result = $this->where($filter)->find();
        if(!empty($result)) $result = $result->toArray();
        return $result;
    }
}